<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>layer弹框演示</title>
    <script src="/AdminExpress/js/jquery2.1.4.js"></script>
    <!--jquery必须在layer之前引入，因为layer先要依赖jQuery，不然使用layer效果时将报错-->
    <script src="/AdminExpress/layer/layer.js"></script>

    <script>
        function msgTest(){
            layer.msg("提示文字");
        }

        function loadTest(){
            //返回弹出层的id
            var windowId = layer.load(0);//0-16
            //通过窗口的id，关闭窗口
            setTimeout(function (){
                layer.close(windowId);
            },2000);
        }

        function msg_loadTest(){
            layer.msg("提示文字",{icon:16,shade:0.01});
        }

        function alertTest(){
            layer.alert("文字内容",{icon:10});
        }

        function tipsTest(){
            layer.tips("这里有秘密","#p1",{tipsMore:true,tips:1});
        }

    </script>

</head>
<body>

<button onclick="msgTest()">msg函数</button><br>
<button onclick="loadTest()">load函数</button><br>
<button onclick="msg_loadTest()">msg_lod函数</button><br>
<button onclick="alertTest()">alert函数</button><br>
<button onclick="tipsTest()">tips函数</button><br>
<br>
<br>
<br>
<br>
<p>
    锄禾<span id="p1">日</span>当午，汗滴禾下土。
</p>


</body>
</html>
